package com.atguigu.binarysearch;

/**
 * @author xgc
 * @create 2021-07-22 11:00
 * 静态内部类（延迟加载，线程安全）
 */
public class Singleton5 {
    //私有构造
    private Singleton5(){}

    //静态内部类
    private static class InnerObjecr{
        private static Singleton5 singleton5 = new Singleton5();
    }

    public static Singleton5 getInstance(){
        return InnerObjecr.singleton5;
    }
}
